package com.zjsru.api.clients;

import com.zjsru.api.fallback.ProductClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "product-service", fallback = ProductClientFallback.class)
public interface ProductClient {
    @PostMapping("/product/deduct")
    String deductStock(@RequestParam("productId") String productId, @RequestParam("count") int count);
}
